package com.demo.crm.model;

import lombok.Data;

/**
 * ajax请求响应信息模板
 *
 * @author tanshuai
 */
@Data
public class AjaxInfo {

    private boolean success = true;
    private Object message;

    public static final AjaxInfo EXCEPTION = new AjaxInfo(false, "error");
    public static final AjaxInfo SUCCESS = new AjaxInfo(true, "success");

    public AjaxInfo(boolean success) {
        this.success = success;
    }

    public AjaxInfo(Object message) {
        this.message = message;
    }

    public AjaxInfo(boolean success, Object message) {
        this.success = success;
        this.message = message;
    }
}